<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">
	<ui:define name="content">
		<h2>An error occurred:</h2>
		<h:inputHidden value="#{errorBean.setErrorTitle(requestScope['javax.servlet.error.message'])}"></h:inputHidden>
  	   	<div id="errorMessage">
           Problem cause: <br />
           #{errorBean.errorTitle}
       	</div>
       	<div id="sorryMessage">We are terribly sorry for any inconvenience.</div>
        <br />
        <h:inputHidden value="#{errorBean.stackTrace}"></h:inputHidden>
        <h:form>
 	     	<h:commandLink styleClass="hideShowStack" value="View Stack Trace" action="#{errorBean.viewStack}">
       		</h:commandLink>
		</h:form>
		<h:inputTextarea id="stackArea" rendered="#{errorBean.showStackTrace eq true}" cols="100" rows="20" readonly="true"
				value="#{errorBean.errorDetails}">
		</h:inputTextarea>
		<br />
       	<div id="redirectOptions">
       		<h:form rendered="#{menuController.userRank != 2}">
    			<a href="employeeAuthentification.xhtml" id="goToHome">Login Page</a> 
    		</h:form>
	       	<h:outputLink target="#{menuController.url}" id="retry">
        		<h:outputText value="Retry" />
        	</h:outputLink>
        </div>
   </ui:define>  
</ui:composition>
</html>

